<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/displaytag.tld" prefix="display" %>

  <link href="<%= request.getContextPath() + "/css/consultsoft_css.css" %>" rel="stylesheet" type="text/css">
	<link href="<%= request.getContextPath() + "/css/bloques.css" %>" rel="stylesheet" type="text/css">
	
<script src="<%=request.getContextPath()%>/js/displaytag.js" type="text/javascript"></script>
 
<script  type="text/javascript">
    function setValues(code, name)
    {
        opener.document.frmCreateOption.programCode.value = code ;
        opener.document.frmCreateOption.programName.value = name;
        window.close();                 
    }
    function deactivate()
    {
        opener.document.frmCreateOption.programCode.value ="";
        opener.document.frmCreateOption.programName.value = "";
        window.close();                 
    }
</script>
 <!--SECCION DE MENSAJES DE ERROR INFORMACION PRECAUCION Y CONFIRMACION -->
  <!--MENSAJES DE INFORMACION  -->
<logic:messagesPresent message="true"> 
 <table title="Mensajes de aplicacion" align="center" >
  <tr>
    <td><html:messages id="msg" property="msgInfor" message="true">
      <table border="0" cellpadding="0" cellspacing="0">
       <tr>
         <td bgcolor="#A8BDDD" class="titalert"></td>
         <td bgcolor="#A8BDDD" class="titalert" height="30"><bean:write name="msg"/></td>
       </tr>
      </table></html:messages> 
    </td>
  </tr>
 </table>
 
  <table title="Mensajes de aplicacion" align="center" >
  <tr>
    <td><html:messages id="msg" property="msgError" message="true">
      <table border="0" cellpadding="0" cellspacing="0">
       <tr>
         <td bgcolor="#A8BDDD" class="titalert"></td>
         <td bgcolor="#A8BDDD" class="titalert" height="30"><bean:write name="msg"/></td>
       </tr>
      </table></html:messages> 
    </td>
  </tr>
 </table>
 
 <table title="Mensajes de aplicacion" align="center" >
  <tr>
    <td><html:messages id="msg" property="msgWarn" message="true">
      <table border="0" cellpadding="0" cellspacing="0">
       <tr>
         <td bgcolor="#A8BDDD" class="titalert"></td>
         <td bgcolor="#A8BDDD" class="titalert" height="30"><bean:write name="msg"/></td>
       </tr>
      </table></html:messages> 
    </td>
  </tr>
 </table>
 
 <table title="Mensajes de aplicacion" align="center" >
  <tr>
    <td><html:messages id="msg" property="msgOk" message="true">
      <table border="0" cellpadding="0" cellspacing="0">
       <tr>
         <td bgcolor="#A8BDDD" class="titalert"></td>
         <td bgcolor="#A8BDDD" class="titalert" height="30"><bean:write name="msg"/></td>
       </tr>
      </table></html:messages> 
    </td>
  </tr>
 </table>
</logic:messagesPresent> 
 
<table width="99%"  border="0" cellpadding="0" cellspacing="0" widtd="100%">
  <!--TITULO DE LA CONSULTA -->
  <tr> 
    <td height="25" colspan="12" align="center" class="titulosenblanco"><strong> CRITERIOS DE BUSQUEDA DE PROGRAMAS</strong></td>
  </tr>
  
  
  <tr align="left"> 
    <td height="25" colspan="12" class="titulosenblanco">
      <table width="99%" border="0" cellpadding="0" cellspacing="0">
        <tr> 
          <td align="right">
             <a href="#" onclick="deactivate()">Desvincular</a>
          </td>
        </tr>
        <tr> 
          <td>&nbsp;</td>
        </tr>  
      </table>
    </td>		
  </tr>

  
  <!--CAMPOS DEL FORMULARIO PARA CONSULTA  -->
  
  <html:form action="/admin/selectProgram.do" focus="name">  
   <input type="hidden" name="search" value="search" />
  <tr align="left">
    <td width="100%" align="center"> <table width="70%" border="0" cellpadding="3" cellspacing="3">
  <!--CAMPO 1  -->
        <tr> 
          <td width="7%">&nbsp;</td>
          <td width="22%" align="left" class="celdatabla"><strong>Programa</strong> 
            &nbsp;&nbsp;</td>
          <td width="61%"><html:text size= "40" styleClass="form" property="name" maxlength="40"/></td>
          <td width="10%">&nbsp;</td>
        </tr>
  <!--CAMPO 2  -->
        <tr> 
          <td width="7%">&nbsp;</td>
          <td width="22%" align="left" class="celdatabla"><strong>Descripcion</strong> 
            &nbsp;&nbsp;</td>
          <td width="61%"><html:text size= "40" styleClass="form" property="description" maxlength="40"/> 
          </td>
          <td width="10%">&nbsp;</td>
        </tr>
  <!--CAMPO 3 (TIPO SELECT) -->
        <tr> 
          <td width="7%">&nbsp;</td>
          <td width="22%" align="left" class="celdatabla"><strong>Tipo de Programa</strong> 
            &nbsp;&nbsp;</td>
          <td width="61%"><html:select styleClass="form" property="programType" style="width:215" > 
            <html:option value = "U" >Web</html:option>
            </html:select></td>
          <td width="10%">&nbsp;</td>
        </tr>
 
  
  <!--BOTON DE SUBMIT  -->
        <tr> 
          <td width="7%">&nbsp;</td>
          <td width="22%">&nbsp;</td>
          <td width="61%"><input type="submit" name="Submit" value="Buscar"> </td>
          <td width="10%">&nbsp;</td>
        </tr>
        <tr> 
          <td colspan="4">&nbsp;</td>
        </tr>
        <tr> 
          <td width="7%">&nbsp;</td>
          <td width="22%">&nbsp;</td>
          <td width="61%">&nbsp;</td>
          <td width="10%">&nbsp;</td>
        </tr>
      </table>
	</td>
  </tr>
</html:form> 	
  

  <tr> 
    <td colspan="12" align="left">
  <!--LISTADO EN CASO DE OBTENER REGISTROS  -->
      <logic:present name="programList"> 
      <%
        String style = "add";%>
  <!--ESPECIFICACION DE TABLA DEL LISTADO: PROGRAMAS  -->
        <display:table name="requestScope.programList"  class="bordestable"  id="programs"   cellpadding="3" cellspacing="1" style="width:100%">

   <!--COLUMNA: NOMBRE-->
          <display:column headerClass="headerTable" title="Programa" class="Numero" >
			     
              <bean:write name="programs" property="name" /> 	
           
          </display:column>		

       <display:column headerClass="headerTable" title="Seleccionar" class="Numero" >
        
        
           <div align="center"><input type="RADIO" name="sel" onclick='setValues("<bean:write name="programs" property="code" />","<bean:write name="programs" property="name" />")'  /></div>
        
      </display:column>        

        </display:table>
      </logic:present>
		</td>
  </tr>
</table>  
  
  
